import request from '@/utils/request'
import {content} from "./base";

export function getPage(params) {
  return request({
    url: content + '/subject/getPage',
    method:'post',
    contentType: "application/json;charset=UTF-8",
    data: params
  })
}

export function getSubject(id){
  return request({
    url: content + 'subject/getSubject/' + id,
    method: 'get',
  })
}

export function deleteSubject(ids) {
  return request({
    url: content + '/subject/delete',
    method: 'post',
    data: ids
  })
}

export function createSubject(data) {
  return request({
    url: content + '/subject/create',
    method: 'post',
    data: data
  })
}

export function updateSubject(id, data) {
  return request({
    url: content + '/subject/update/' + id,
    method: 'post',
    data: data
  })
}

export function updateShowStatus(params) {
  return request({
    url: content + '/subject/update/showStatus',
    method: 'post',
    data: params
  })
}

export function updateRecommendStatus(params) {
  return request({
    url: content + '/subject/update/recommendStatus',
    method: 'post',
    data: params
  })
}
